import core from 'app/core';
require('./controllers/home');
require('./controllers/artical');

function RouteProvider($routeProvider) {
  $routeProvider.when('/', {
      template: require('./tpls/home.html'),
      controller: 'HomeCtrl'
  }).when('/:slug', {
      template: require('./tpls/article.html'),
      controller: 'ArticleCtrl'
  }).otherwise({
      redirectTo: '/'
  })
}

core.config(RouteProvider);
